{
  LW Motion -- LightWave Item Motions

  Motion handlers apply procedural translation, rotation and scaling to an item.
  They can be associated with any item in a scene that can be keyframed
  (objects, lights, cameras, bones).

  Based on lwmotion.h which is:
  Copyright 1999, NewTek, Inc.
}

{
  Copyright 2012, Jameel Halabi

  This unit is part of the BlaiseWave wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}
unit LW_Motion;

{$mode objfpc}{$H+}

interface

uses
  LW_Types   ,
  LW_Handler ,
  LW_Render  ;

const
  LWITEMMOTION_HCLASS	= 'ItemMotionHandler'   ;
  LWITEMMOTION_ICLASS	= 'ItemMotionInterface' ;
  LWITEMMOTION_GCLASS	= 'ItemMotionGizmo'     ;
  LWITEMMOTION_VERSION = 5 ;

  LWIMF_AFTERIK	= 1 shl 0 ;

type
  PLWItemMotionAccess = ^TLWItemMotionAccess;
  TLWItemMotionAccess = record
    ItemID        : PLWItem  ;
    Frame         : TLWFrame ;
    Time          : TLWTime  ;
    Getparam      : procedure
                    (       Param  : TLWItemParam ;
                            Time   : TLWTime      ;
                            Vector : TLWDVector   ) ;
    Setparam      : procedure
                    (       Param  : TLWItemParam ;
                      const Vector : TLWDVector   ) ;
    AnimationPass : Integer                       ;
  end;

  PLWItemMotionHandler = ^TLWItemMotionHandler ;
  TLWItemMotionHandler = record
    Inst        : PLWInstanceFuncs;
    Item        : PLWItemFuncs    ;
    Evaluate    : procedure
                  (      Instance : PLWInstance         ;
                   const Access   : PLWItemMotionAccess ) ;
    Flags       : function
                  (      Instance : PLWInstance         ) : UInt32;
  end;

implementation

end.

